/*
 *      Created on: Mar 8, 2011
 *      Author: topcoder
 */
#include <Unit.h>

Unit::Unit(const unsigned int factor, const string name)
:factor_m(factor), name_m(name)
{
}


ostream& operator<<(ostream& os, const Unit& unit)
{
    os << unit.name_m;
    return os;
}

unsigned int Unit::getFactor()const
{
    return factor_m;
}

unsigned int Unit::convertToBaseUnitAmount(const unsigned int amount)const
{
    return amount*factor_m;
}








